package com.li.dfw_protobuf_to_netty;

import com.li.dfw_protobuf_to_netty.config.Const;
import com.li.dfw_protobuf_to_netty.netty.BootNettyServer;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;

//@EnableAsync
@SpringBootApplication
public class DfwProtobufToNettyApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(DfwProtobufToNettyApplication.class, args);
    }

//    @Async
    @Override
    public void run(String... args) throws Exception {
//        DataConfigManager.init();
//        ThreadManager.init();
//        TaskFactory.init();
        BootNettyServer bean = new BootNettyServer();
        bean.bind(Const.Port);
    }
}
